From: emellor@leeni.uk.xensource.com Date: Mon, 10 Apr 2006 15:28:52 +0000 (+0100) Subject: Initialise offsetopt when offset == 0. Closes bug #599. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16158^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=02e0e0d9bb791264722682d5dc26691e3a338803;p=xen.git Initialise offsetopt when offset == 0. Closes bug #599. Report and diagnosis by Robert Hendrickx . Signed-off-by: Ewan Mellor --- diff --git a/tools/pygrub/src/fsys/ext2/ext2module.c b/tools/pygrub/src/fsys/ext2/ext2module.c index 63d20f2983..57f1a83eaf 100644 --- a/tools/pygrub/src/fsys/ext2/ext2module.c +++ b/tools/pygrub/src/fsys/ext2/ext2module.c @@ -228,7 +228,10 @@ ext2_fs_open (Ext2Fs *fs, PyObject *args, PyObject *kwargs) } #ifdef HAVE_EXT2FS_OPEN2 - if (offset != 0) { + if (offset == 0) { + offsetopt[0] = '\0'; + } + else { snprintf(offsetopt, 29, "offset=%d", offset); }